package com.mvc.app;

/**
 * Created with IntelliJ IDEA.
 * User: Georgiana.Scarlat
 * Date: 8/27/12
 * Time: 12:35 PM
 */
public class ModelView {

    String htmlViewFileName;
    Model model;

    public String getHtmlViewFileName() {
        return htmlViewFileName;
    }

    public Model getModel() {
        return model;
    }

    public void setHtmlViewFileName(String htmlViewFileName) {
        this.htmlViewFileName = htmlViewFileName;
    }

    public void setModel(Model model) {
        this.model = model;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ModelView modelView = (ModelView) o;

        return !(htmlViewFileName != null ? !htmlViewFileName.equals(modelView.htmlViewFileName) : modelView.htmlViewFileName != null) && !(model != null ? !model.equals(modelView.model) : modelView.model != null);

    }

    @Override
    public int hashCode() {
        int result = htmlViewFileName != null ? htmlViewFileName.hashCode() : 0;
        result = 31 * result + (model != null ? model.hashCode() : 0);
        return result;
    }
}
